
using Core.SimpleTemp.Common;
using Core.SimpleTemp.Entitys;
using Core.Toolkit.Core.Application;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Core.SimpleTemp.Application
{
    [CreateMap(typeof(YH_ScreeningPlan))]
    public class YH_ScreeningPlanDto : Dto
    {
        /// <summary>
        /// 排查单位
        /// </summary>
        public Guid? Unit { get; set; }
        /// <summary>
        /// 排查目的
        /// </summary>
        public String Objective { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>
        public Guid? PersonInCharge { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>
        [ConcurrentKeyToValueAttribute("9008", "PersonInCharge")]
        public string PersonInChargeText { get; set; }
        /// <summary>
        /// 排查要求
        /// </summary>
        public String Requirements { get; set; }
        /// <summary>
        /// 排查内容
        /// </summary>
        public String Content { get; set; }
        /// <summary>
        /// 排查标准类型
        /// </summary>
        public String StandardType { get; set; }
        [KeyToValue("102", "StandardType")]
        public String StandardTypeText { get; set; }
        /// <summary>
        /// 排查岗位
        /// </summary>
        public String InvestigationPost { get; set; }

        /// <summary>
        /// 排查岗位名称
        /// </summary>
        [KeyToValue("60", "InvestigationPost")]
        public String InvestigationPostName { get; set; } 
        /// <summary>
        /// 备注
        /// </summary>
        public String Remark { get; set; }
        /// <summary>
        /// 是否提醒
        /// </summary>
        public bool? IsNotRemind { get; set; }
        /// <summary>
        /// 提前提醒天数
        /// </summary>
        public int? MoveUp { get; set; }
        /// <summary>
        /// 提醒类别(年月)
        /// </summary>
        public String Type { get; set; }
        /// <summary>
        /// 计划开始时间
        /// </summary>
        public DateTime? BeginTime { get; set; }
        /// <summary>
        /// 计划是否正在进行(进行中/关闭)
        /// </summary>
        public bool? IsProceed { get; set; }
        /// <summary>
        /// 状态(保存/提交)
        /// </summary>
        public String Status { get; set; }
        /// <summary>
        /// 隶属工厂
        /// </summary>
        public Guid? CreateFactory { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Guid? CreateDept { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Guid? UpdateDept { get; set; }


        /// <summary>
        /// 状态：无字段，逻辑控制。(0未开始 1进行中 2已完成)
        /// </summary>
        public string PlanState { get; set; }
        public ICollection<YH_ScreeningPlanProjectDto> YH_ScreeningPlanProject { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public ICollection<YH_ScreeningPlanUserDto> YH_ScreeningPlanUser { get; set; }

        #region *
        /// <summary>
        /// 按年排查提醒时间
        /// </summary>
        public int BeginTimeByYear { get; set; }
        /// <summary>
        /// 按月排查提醒时间
        /// </summary>
        public int BeginTimeByMonth { get; set; }
        /// <summary>
        /// 按周排查提醒时间
        /// </summary>
        public int BeginTimeByWeek { get; set; }
        /// <summary>
        /// 自定义排查时间
        /// </summary>
        public DateTime? BeginTimeByCustom { get; set; }
        public int? Month { get; set; }
        public int? Day { get; set; }
        public int? Hour { get; set; }
        public int? Week { get; set; }
        public DateTime? NowTime { get; set; }
        /// <summary>
        /// *排查类别(日常排查/计划排查)
        /// </summary>
        [StringLength(20)]
        public String ScreeningType { get; set; }
        #endregion
        /// <summary>
        /// 参与人id
        /// </summary>
        public Guid? ParticipantID { get; set; }
        /// <summary>
        /// 参与人text
        /// </summary>
        public String Participant { get; set; }
        /// <summary>
        /// 提醒表
        /// </summary>
        public ICollection<YH_ScreeningPlanTaskDto> YH_ScreeningPlanTask { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>
        public SysUser SysUser { get; set; }
        /// <summary>
        /// 排查单位
        /// </summary>
        public SysDepartment SysDepartment { get; set; }

        /// <summary>
        /// 提醒文本
        /// </summary>
        public String FrequencyText { get; set; }
        /// <summary>
        /// 项目和详细冗余结果类
        /// </summary>
        public ICollection<YH_ProjectAndDetail> YH_ProjectAndDetail { get; set; } 

        /// <summary>
        /// 排查人id
        /// </summary>
        public Guid? ScreeningPerson { get; set; }
    } 
}
